package routes

import (
	"go_frame/logger"
	"go_frame/middlewares"
	"net/http"

	"github.com/gin-gonic/gin"
)

type Data struct {
	Name  string      `json:"name"`
	Age   int         `json:"age"`
	Other interface{} `json:"other,omitempty"`
}

func Setup() *gin.Engine {
	r := gin.New()
	r.Use(logger.GinLogger(), logger.GinRecovery(true))
	r.Use(middlewares.Cors())
	r.GET("/", func(c *gin.Context) {
		c.String(http.StatusOK, "Ok")
	})
	return r
}
